package com.itic.appbase.framework.common.basevo;

import com.itic.appbase.framework.common.constants.DBConst;
import com.itic.appbase.framework.common.constants.IticConst;
import com.itic.appbase.framework.common.persistence.model.BaseModel;
import com.itic.appbase.framework.utils.StringHelper;

/**
 * 用户展现类(VO).
 * <p>
 * Company: itic
 * </p>
 * 
 * @author: idong
 * @date: 2015年5月8日 上午8:55:51
 * @version: V1.0
 */
public class User
        extends BaseModel
        implements java.io.Serializable {

    /**
     * @Fields: serialVersionUID
     */
    private static final long serialVersionUID = -7508626144661140957L;

    private String id;

    private String username;

    private String password;

    private String realname;

    private String org;
    
    private String isEffective;
    
    private String portal;
    
    private String isUsable;

    public User() {
    }

    public User(String username) {
        this.username = username;
        this.isEffective = DBConst.TRUE;
    }

    public User(String username, String password, String portal) {
        this.username = username;
        this.password = password;
        this.portal = StringHelper.isNotBlank(portal) ? portal : IticConst.PORTAL_DEFAULT;
        this.isEffective = DBConst.TRUE;
    }

    // id Convert to UserID
    public String getUserId() {
        return this.getId();
    }

    public String getOrganizationCode() {
        return this.getOrg();
    }

    // get set
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getOrg() {
        return org;
    }

    public void setOrg(String org) {
        this.org = org;
    }
    
    @Override
    public String getIsEffective() {
        return isEffective;
    }
    
    @Override
    public void setIsEffective(String isEffective) {
        this.isEffective = isEffective;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getPortal() {
        return portal;
    }

    public void setPortal(String portal) {
        this.portal = portal;
    }

    public String getIsUsable() {
        return isUsable;
    }

    public void setIsUsable(String isUsable) {
        this.isUsable = isUsable;
    }

}
